<?php
use_helper('I18N');
?>
<div class="breadcrumbs" id="breadcrumbs">
<script>
$(function() {
    $("#btnSubmit").click(function(){
        $("#bankForm").submit();
    });

    $("#bankForm").validate({
        messages : {
            transactionPassword: {
                remote: "Security Password is not valid."
            }
        },
        rules : {
            "bankName" : {
                required : true
            },
            "withdrawAmount" : {
                required : true
            }
        },
        submitHandler: function(form) {
            waiting();
            var amount = $('#withdrawAmount').autoNumericGet();
            $("#withdrawAmount").val(amount);
            form.submit();
        },
        success: function(label) {
            //label.addClass("valid").text("Valid captcha!")
        }
    });

    $('#withdrawAmount').autoNumeric({
        mDec: 2
    });

    $("#depositDate").datepicker({
        dateFormat : 'yy-mm-dd',
		changeMonth : true,
		changeYear : true,
		// showButtonPanel: true,
		yearRange : '-100:+50'
    });
});
</script>

    <ul class="breadcrumb">
        <li>
            <i class="icon-home home-icon"></i>
            <a href="/member/withdrawal"><?php echo __('Withdrawal') ?></a>
        </li>
    </ul>

    <div class="nav-search" id="nav-search">
        <form class="form-search">
            <span class="input-icon">
                <input type="text" placeholder="Search ..." class="nav-search-input"
                       id="nav-search-input" autocomplete="off"/>
                <i class="icon-search nav-search-icon"></i>
            </span>
        </form>
    </div>
    <!-- #nav-search -->
</div>

<div class="page-content">

    <div class="row">
        <div class="col-xs-12">
            <h3 class="header smaller lighter green"><?php echo __('Submit Withdraw Request') ?></h3>

            <!-- PAGE CONTENT BEGINS -->
            <?php include_component('component', 'alert', array('param' => $sf_user->getAttribute(Globals::SESSION_DISTID, 0))) ?>

            <form action="/member/doWithdrawal" id="bankForm" name="bankForm" method="post" class="form-horizontal" role="form" enctype="multipart/form-data">

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right"><span style="color: #D16E6C">* </span><?php echo __("Game")?></label>

                    <div class="col-sm-9">
                        <select id="game" name="game">
                            <option id="Live Casino">Live Casino</option>
                            <option id="Sport">Sport</option>
                            <option id="Lotto">Lotto</option>
                            <option id="Horse" disabled="disabled">Horse</option>
                        </select>
                    </div>
                </div>

                <div class="space-4"></div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right"><span style="color: #D16E6C">* </span><?php echo __("Payment Method")?></label>

                    <div class="col-sm-9">

                        <select id="bankId" name="bankId">
                            <?php foreach ($distributorBanks as $distributorBank) {
                                echo "<option value='".$distributorBank->getBankId()."'>".$distributorBank->getBankName()." - ".$distributorBank->getBankHolderName()." (".$distributorBank->getBankAccNo().")</option>";
                            }
                            ?>
                        </select>
                    </div>
                </div>

                <div class="space-4"></div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right"><span style="color: #D16E6C">* </span><?php echo __("Withdraw Amount")?></label>

                    <div class="col-sm-9">
                        <input name="withdrawAmount" type="text" id="withdrawAmount" size="30"
                                                         value=""/>
                    </div>
                </div>

                <div class="space-4"></div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right"><font color="#dc143c"></font></label>

                    <div class="col-sm-9">
                        <font color="#dc143c"> <?php echo __('Minimum amount is RM 30') ?></font>
                    </div>
                </div>
                <div class="space-4"></div>

                <div class="clearfix form-actions">
                    <div class="col-md-offset-3 col-md-9">
                        <button class="btn btn-info" type="button" id="btnSubmit">
                            <i class="icon-ok bigger-110"></i>
                            Submit
                        </button>
                    </div>
                </div>
            </form>
        <!-- /.col -->
    </div>
</div>